//
//  UIViewController+List.h
//  KKListViewDemo
//
//  Created by liaozhenming on 16/11/4.
//  Copyright © 2016年 liaozhenming. All rights reserved.
//

#import <UIKit/UIKit.h>

#import "KKListViewTools.h"
#import "KKListViewProtocolManager.h"

@interface UIViewController (List)

@property (nonatomic, strong) KKListViewProtocolManager *kk_listViewProtocolManager;    /**<代理协议的处理者*/

@property (weak, nonatomic) UITableView *kk_tableView;
@property (weak, nonatomic) UICollectionView *kk_collectionView;

//  注册tableView delegate如果为nil 则表示代理为基类处理
- (void)kk_registerTableView:(UITableView*)tableView delegate:(__weak id)delegate;

//  注册collectionView delegate如果为nil 则表示代理为基类处理
- (void)kk_registerCollectionView:(UICollectionView*)collectionView delegate:(__weak id)delegate;


@property (nonatomic, strong) NSMutableArray *kk_sectionItems;  /**<section数据组*/

@end


#pragma mark - About UITableView methods
//  建议使用以下相关类的子类
@interface KKTableViewCell : UITableViewCell

@property (nonatomic, strong) KKListViewCellItem *kk_cellItem;

@end


@interface KKTableViewHeaderView : UITableViewHeaderFooterView

@property (nonatomic, strong) KKListViewSectionItem *kk_sectionItem;

@end


@interface KKTableViewFooterView : UITableViewHeaderFooterView

@property (nonatomic, strong) KKListViewSectionItem *kk_sectionItem;

@end


#pragma mark - About UICollectionView methods

@interface KKCollectionViewCell : UICollectionViewCell

@property (nonatomic, strong) KKListViewCellItem *kk_cellItem;

@end


@interface KKCollectionHeaderView : UICollectionReusableView

@property (nonatomic, strong) KKListViewSectionItem *kk_sectionItem;

@end


@interface KKCollectionFooterView : UICollectionReusableView

@property (nonatomic, strong) KKListViewSectionItem *kk_sectionItem;

@end